package com.example.demo.controller;

import com.example.demo.entity.FunctionPoint;
import com.example.demo.result.R;
import com.example.demo.service.FunctionPointService;
import com.example.demo.utils.RUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/Function")
public class FunctionController {

    @Autowired
    FunctionPointService functionPointService;

    @CrossOrigin
    @RequestMapping("/functionInfo")
    @ResponseBody
    public R getFunctionInfo(FunctionPoint function){
        return RUtils.success(functionPointService.getFunctionInfo(function));
    }

}
